﻿package  
{
	import cdv.Trame;
	import flash.display.MovieClip;
	import flash.events.Event;
	import home.TheHome;
	/**
	 * ...
	 * @author ben.
	 */
	public class Main extends MovieClip
	{
		
		public var guide1:Trame
		public var guide2:Trame
		public var guide3:Trame
		public var guideFooter:Trame
		
		public var title:MovieClip
		public var footer:MovieClip
		
		public var theHome:TheHome
		
		public function Main() 
		{
			
		}
		
		private function _onResize(e:Event = null):void 
		{
			guide1.x = 10;
			guide1.y = guide2.y = guide3.y = 10;
			guide2.x = Math.round((stage.stageWidth - 40) / 3) + 20;
			guide3.x = Math.round((stage.stageWidth - 40) / 3) * 2 + 30;
			
			guide1.width = guide2.width = guide3.width = Math.round((stage.stageWidth - 40) / 3);
			guide1.height = guide2.height = guide3.height = Math.round(stage.stageHeight - 60);
			
			
			guideFooter.x = 0;
			guideFooter.y = stage.stageHeight - 40;
			guideFooter.width = stage.stageWidth;
			guideFooter.height = 40;
			
			title.x = Math.round(stage.stageWidth / 2);
			title.y = 50;
			
			footer.y = stage.stageHeight - 30;
			footer.x = stage.stageWidth / 2;
			
		}
		
		public function Init()
		{
			stage.addEventListener(Event.RESIZE, _onResize);
			_onResize();
		}
		
	}

}